package mobi.greenplate.client.domain;

import java.io.Serializable;

public class Transport implements Serializable {

    private static final long serialVersionUID = 1L;
    private Long id;
    private String transportName;
    private String transportDescription;
    private TransportType type;
    private User owner;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTransportName() {
        return transportName;
    }

    public void setTransportName(String transportName) {
        this.transportName = transportName;
    }

    public String getTransportDescription() {
        return transportDescription;
    }

    public void setTransportDescription(String transportDescription) {
        this.transportDescription = transportDescription;
    }

    public TransportType getType() {
        return type;
    }

    public void setType(TransportType type) {
        this.type = type;
    }

    public User getOwner() {
        return owner;
    }

    public void setOwner(User owner) {
        this.owner = owner;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Transport other = (Transport) obj;
        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
            return false;
        }
        if ((this.transportName == null) ? (other.transportName != null) : !this.transportName.equals(other.transportName)) {
            return false;
        }
        if ((this.transportDescription == null) ? (other.transportDescription != null) : !this.transportDescription.equals(other.transportDescription)) {
            return false;
        }
        if (this.type != other.type) {
            return false;
        }
        if (this.owner != other.owner && (this.owner == null || !this.owner.equals(other.owner))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 97 * hash + (this.id != null ? this.id.hashCode() : 0);
        hash = 97 * hash + (this.transportName != null ? this.transportName.hashCode() : 0);
        hash = 97 * hash + (this.transportDescription != null ? this.transportDescription.hashCode() : 0);
        hash = 97 * hash + (this.type != null ? this.type.hashCode() : 0);
        hash = 97 * hash + (this.owner != null ? this.owner.hashCode() : 0);
        return hash;
    }

    @Override
    public String toString() {
        return "Transport{" + "id=" + id + "transportName=" + transportName + "transportDescription=" + transportDescription + "type=" + type + "owner=" + owner + '}';
    }
}
